<template>
  <div class="cloud">
    <h2 class="hometitle">标签分类</h2>
    <ul>
      <router-link
        v-for="(tag,index) in Tags"
        :key="index"
        :to="{name:'_list',query:{tagId:tag.id}}"
      >{{tag.tagsName}}</router-link>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      Tags: []
    };
  },
  created() {
    this.Tags = this.getUserTags();
  },
  methods: {
    getUserTags() {
      this.$http({
        url: this.$http.adornUrl("/api/tag/list"),
        method: "GET"
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.Tags = data.data;
        }
      });
    }
  }
};
</script>

<style lang="scss">
  
</style>

